home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- ds.library/DS_BTreeOpen
- ds.library/DS_BTreeClose
- ds.library/DS_BTreeInsert
- ds.library/DS_BTreeDelete
- ds.library/DS_BTreeGetEntry
- ds.library/DS_BTreeOpen ds.library/DS_BTreeOpen
-
- NAME
- DS_BTreeOpen -- open or create a new b-tree on disk (V37)
-
- SYNOPSIS
- result = DS_BTreeOpen(btree,filename,keysize,datasize,comparefunction);
- D0 D1 D2 D3 D4 D5
-
- int DS_BTreeOpen(BTREE *, char *, int, int, (*int)(void *,void *) );
-
- FUNCTION
- Opens or creates a b-tree on disk with the filename and the corresponding
- keysize and datasize. The comparefunction is used to compate two keys/entries.
-
- INPUTS
- btree - a pointer to a variable of type BTREE
- keysize - an integer value telling the size of the key
- datasize - an integer value for the size of the whole data structure to
- be stored in the file
- comparefunction - a pointer to a function awaiting two parameters; this
- function returns 1 if argument 1 is greater than argument 2,
- it returns 0 if both arguments are equal, and it return -1 else.
-
- RESULT
- result - 1 if the b-tree could be opened or created,
- 0 if something went wrong
-
- SEE ALSO
- DS_BTreeClose
-
- ds.library/DS_BTreeClose ds.library/DS_BTreeClose
-
- NAME
- DS_BTreeClose -- close a b-tree on disk
-
- SYNOPSIS
- DS_BTreeClose(btree)
- D1
-
- void DS_BTreeClose(BTREE);
-
- INPUTS
- btree - the tree to be closed.
-
- RESULT
- none
-
- SEE ALSO
- DS_BTreeOpen()
-
- ds.library/DS_BTreeInsert ds.library/DS_BTreeInsert
-
- NAME
- DS_BTreeInsert -- insert a node into the b-tree
-
- SYNOPSIS
- result = DS_BTreeClose(btree,key,data)
- D0 D1 D2 D3
-
- int DS_BTreeClose(BTREE, void *, void *);
-
- INPUTS
- btree - the b-tree on disk
- key - a pointer to the key of the data to be inserted.
- data - a pointer to the the data structure to be inserted.
-
- RESULT
- result - 1 if key could be inserted.
- 0 if key was already present in b-tree
-
- SEE ALSO
- DS_BTreeDelete()
-
- ds.library/DS_BTreeDelete ds.library/DS_BTreeDelete
-
- NAME
- DS_BTreeDelete -- delete a node from a b-tree on disk
-
- SYNOPSIS
- result = DS_BTreeClose(btree, key)
- D0 D1 D2
-
- int DS_BTreeClose(BTREE, void *);
-
- INPUTS
- btree - the b-tree on disk
- key - a pointer to the key of the data structure to be deleted.
-
- RESULT
- result - 1 if key is deleted
- 0 if key was not in the b-tree
-
- SEE ALSO
- DS_BTreeInsert()
-
- ds.library/DS_BTreeGetEntry ds.library/DS_BTreeGetEntry
-
- NAME
- DS_BTreeGetentry -- get an entry from a b-tree on disk
-
- SYNOPSIS
- result = DS_BTreeClose(btree, key, buffer)
- D0 D1 D2 D3
-
- int DS_BTreeClose(BTREE, void *, void *);
-
- INPUTS
- btree - the b-tree on disk
- key - a pointer to the key of the data structure to get.
- memory - a pointer to a memory area where the data will be copied to.
- rememer: this area MUST be large enough !
-
- RESULT
- result - 1 if key was found and data copied
- 0 if key was not in the b-tree
-
- SEE ALSO
- DS_BTreeInsert(), DS_BTreeDelete()
-
-
-